<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			*{margin: 0;padding: 0}
			div{
				width: 1366px;margin: 0 auto;
				font-size: 2em;
				color: #bdb6ff;
			}
			div img{width: 1366px;display: block;margin: auto}
		</style>
	</head>
	<body>
		<div style="width: 100%">
			<img src="passat_12.jpg" alt="">
		</div>
	</body>
	<script type="text/javascript">
		
		//工厂模式
			//造一辆车 出厂 （合格证/建议零售价/说明书）
		
		function fun2(vehicle,leave,quality,retail,ShuoMingbook){
			var car = Object();
			car.vehicle = vehicle;
			car.leave = leave;
			car.quality = quality;
			car.retail = retail;
			car.ShuoMingbook = ShuoMingbook;
			car.say = function(){
			document.write(this.vehicle+",出厂时间是："+this.leave+",合格证:"+this.quality+",建议零售价:"+this.retail+",说明:"+this.ShuoMingbook)
			}
			return car;
		}
		var vehicle = fun2("<div>New Passat（全新帕萨特）","2017-7-25","合格！","22.28-24.58万元","大众全新第三代EA888发动机，集领先科技之大成，强劲动力一触即发，绵绵不绝，尽情畅享驾驭快感的同时，油耗同样处于较低水平，可谓高动力输出、低燃油消耗的典范。。</div>");
		
		
		
		
		vehicle.say();
		
		
		
			
		
	</script>
</html>
